package com.qsxc.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 推广员信息表
 * </p>
 *
 * @author 
 * @since 2024-10-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SmPromoter对象", description="推广员信息表")
public class SmPromoter extends Model<SmPromoter> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "创建人")
    @TableField("create_by")
    private Long createBy;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "更新人")
    @TableField("update_by")
    private Long updateBy;

    @ApiModelProperty(value = "更新时间")
    @TableField("update_time")
    private Date updateTime;

    @ApiModelProperty(value = "用户姓名")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "手机号")
    @TableField("telephone")
    private String telephone;

    @ApiModelProperty(value = "所属城市")
    @TableField("city_id")
    private Long cityId;

    @ApiModelProperty(value = "头像")
    @TableField("head_url")
    private String headUrl;

    @ApiModelProperty(value = "微信openid (公众号上绑定)")
    @TableField("openid")
    private String openid;

    @ApiModelProperty(value = "推广员级别 (1: 一级, 2: 二级)")
    @TableField("level")
    private String level;

    @ApiModelProperty(value = "上级推广员id")
    @TableField("p_id")
    private Long pId;

    @ApiModelProperty(value = "学员推广分成比例 (百分数)")
    @TableField("rate_student")
    private Integer rateStudent;

    @ApiModelProperty(value = "上级推广员提成比例 (百分数)")
    @TableField("rate_higher")
    private Integer rateHigher;

    @ApiModelProperty(value = "银行卡号")
    @TableField("bank_card_no")
    private String bankCardNo;

    @TableField("status")
    private String status;


    public static final String ID = "id";

    public static final String CREATE_BY = "create_by";

    public static final String CREATE_TIME = "create_time";

    public static final String UPDATE_BY = "update_by";

    public static final String UPDATE_TIME = "update_time";

    public static final String NAME = "name";

    public static final String TELEPHONE = "telephone";

    public static final String CITY_ID = "city_id";

    public static final String HEAD_URL = "head_url";

    public static final String OPENID = "openid";

    public static final String LEVEL = "level";

    public static final String P_ID = "p_id";

    public static final String RATE_STUDENT = "rate_student";

    public static final String RATE_HIGHER = "rate_higher";

    public static final String BANK_CARD_NO = "bank_card_no";

    public static final String STATUS = "status";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
